x86: small adjustment to asm constraints for c/s 19400
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 31 Mar 2009 12:14:10 +0000 (13:14 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 31 Mar 2009 12:14:10 +0000 (13:14 +0100)
Properly indicate the variable that the asm writes to, and allow
compiler more freedom in selecting a suitable input operand for the
ltr instruction.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen/arch/x86/traps.c

index dfdc7bf044bbcfa48787accb3565f19c1197762f..360b46bf26c88b79886d87246361368f9a6d4d35 100644 (file)
@@ -3048,8 +3048,8 @@ void load_TR(void)
 
     /* Switch to non-compat GDT (which has B bit clear) to execute LTR. */
     asm volatile (
-        "sgdt %1; lgdt %2; ltr %%ax; lgdt %1"
-        : : "a" (TSS_ENTRY << 3), "m" (old_gdt), "m" (tss_gdt) : "memory" );
+        "sgdt %0; lgdt %2; ltr %w1; lgdt %0"
+        : "=m" (old_gdt) : "rm" (TSS_ENTRY << 3), "m" (tss_gdt) : "memory" );
 }
 
 void __devinit percpu_traps_init(void)